package com.icart.entities;

import javax.persistence.*;
import java.math.BigDecimal;
import java.sql.Timestamp;

@Entity
@Table(name = "cu_custmemcard", schema = "ams", catalog = "")
public class CuCustmemcardEntity {
    private long cardid;
    private long custid;
    private String cardno;
    private String cardpwd;
    private String cardtype;
    private Long tcid;
    private BigDecimal balance;
    private Timestamp expidate;
    private String limitchn;
    private String limitcarno;
    private String remark;
    private Long creatchn;
    private Timestamp creattime;
    private Long creator;
    private BigDecimal saleamt;
    private Integer state;

    @Id
    @Column(name = "cardid")
    public long getCardid() {
        return cardid;
    }

    public void setCardid(long cardid) {
        this.cardid = cardid;
    }

    @Basic
    @Column(name = "custid")
    public long getCustid() {
        return custid;
    }

    public void setCustid(long custid) {
        this.custid = custid;
    }

    @Basic
    @Column(name = "cardno")
    public String getCardno() {
        return cardno;
    }

    public void setCardno(String cardno) {
        this.cardno = cardno;
    }

    @Basic
    @Column(name = "cardpwd")
    public String getCardpwd() {
        return cardpwd;
    }

    public void setCardpwd(String cardpwd) {
        this.cardpwd = cardpwd;
    }

    @Basic
    @Column(name = "cardtype")
    public String getCardtype() {
        return cardtype;
    }

    public void setCardtype(String cardtype) {
        this.cardtype = cardtype;
    }

    @Basic
    @Column(name = "tcid")
    public Long getTcid() {
        return tcid;
    }

    public void setTcid(Long tcid) {
        this.tcid = tcid;
    }

    @Basic
    @Column(name = "balance")
    public BigDecimal getBalance() {
        return balance;
    }

    public void setBalance(BigDecimal balance) {
        this.balance = balance;
    }

    @Basic
    @Column(name = "expidate")
    public Timestamp getExpidate() {
        return expidate;
    }

    public void setExpidate(Timestamp expidate) {
        this.expidate = expidate;
    }

    @Basic
    @Column(name = "limitchn")
    public String getLimitchn() {
        return limitchn;
    }

    public void setLimitchn(String limitchn) {
        this.limitchn = limitchn;
    }

    @Basic
    @Column(name = "limitcarno")
    public String getLimitcarno() {
        return limitcarno;
    }

    public void setLimitcarno(String limitcarno) {
        this.limitcarno = limitcarno;
    }

    @Basic
    @Column(name = "remark")
    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    @Basic
    @Column(name = "creatchn")
    public Long getCreatchn() {
        return creatchn;
    }

    public void setCreatchn(Long creatchn) {
        this.creatchn = creatchn;
    }

    @Basic
    @Column(name = "creattime")
    public Timestamp getCreattime() {
        return creattime;
    }

    public void setCreattime(Timestamp creattime) {
        this.creattime = creattime;
    }

    @Basic
    @Column(name = "creator")
    public Long getCreator() {
        return creator;
    }

    public void setCreator(Long creator) {
        this.creator = creator;
    }

    @Basic
    @Column(name = "saleamt")
    public BigDecimal getSaleamt() {
        return saleamt;
    }

    public void setSaleamt(BigDecimal saleamt) {
        this.saleamt = saleamt;
    }

    @Basic
    @Column(name = "state")
    public Integer getState() {
        return state;
    }

    public void setState(Integer state) {
        this.state = state;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        CuCustmemcardEntity that = (CuCustmemcardEntity) o;

        if (cardid != that.cardid) return false;
        if (custid != that.custid) return false;
        if (cardno != null ? !cardno.equals(that.cardno) : that.cardno != null) return false;
        if (cardpwd != null ? !cardpwd.equals(that.cardpwd) : that.cardpwd != null) return false;
        if (cardtype != null ? !cardtype.equals(that.cardtype) : that.cardtype != null) return false;
        if (tcid != null ? !tcid.equals(that.tcid) : that.tcid != null) return false;
        if (balance != null ? !balance.equals(that.balance) : that.balance != null) return false;
        if (expidate != null ? !expidate.equals(that.expidate) : that.expidate != null) return false;
        if (limitchn != null ? !limitchn.equals(that.limitchn) : that.limitchn != null) return false;
        if (limitcarno != null ? !limitcarno.equals(that.limitcarno) : that.limitcarno != null) return false;
        if (remark != null ? !remark.equals(that.remark) : that.remark != null) return false;
        if (creatchn != null ? !creatchn.equals(that.creatchn) : that.creatchn != null) return false;
        if (creattime != null ? !creattime.equals(that.creattime) : that.creattime != null) return false;
        if (creator != null ? !creator.equals(that.creator) : that.creator != null) return false;
        if (saleamt != null ? !saleamt.equals(that.saleamt) : that.saleamt != null) return false;
        if (state != null ? !state.equals(that.state) : that.state != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = (int) (cardid ^ (cardid >>> 32));
        result = 31 * result + (int) (custid ^ (custid >>> 32));
        result = 31 * result + (cardno != null ? cardno.hashCode() : 0);
        result = 31 * result + (cardpwd != null ? cardpwd.hashCode() : 0);
        result = 31 * result + (cardtype != null ? cardtype.hashCode() : 0);
        result = 31 * result + (tcid != null ? tcid.hashCode() : 0);
        result = 31 * result + (balance != null ? balance.hashCode() : 0);
        result = 31 * result + (expidate != null ? expidate.hashCode() : 0);
        result = 31 * result + (limitchn != null ? limitchn.hashCode() : 0);
        result = 31 * result + (limitcarno != null ? limitcarno.hashCode() : 0);
        result = 31 * result + (remark != null ? remark.hashCode() : 0);
        result = 31 * result + (creatchn != null ? creatchn.hashCode() : 0);
        result = 31 * result + (creattime != null ? creattime.hashCode() : 0);
        result = 31 * result + (creator != null ? creator.hashCode() : 0);
        result = 31 * result + (saleamt != null ? saleamt.hashCode() : 0);
        result = 31 * result + (state != null ? state.hashCode() : 0);
        return result;
    }
}
